<?php
/**
 * Description of fontclass
 *
 * @author Federico del valle (quaidy@gmail.com)
 */
class fonts {
    public function get() {
    
        $font_name = $_GET["arg3"];
        echo "
            @font-face {
            font-family: '".$font_name."';
            font-style: normal;
            font-weight: normal;
            src: local('".$font_name."'), url(".URL_FRONT."'/fonts/load/".$font_name."') format('truetype');
        }";
        die();
    }

    public function load() {
        $font_name = $_GET["arg3"];
        header("Content-Type: application/octet-stream");
        header("Content-Disposition: attachment; filename=\"".$font_name.".ttf\";");
        echo file_get_contents("../frame/fuentes/".$font_name.".ttf");
        die();
    }
}
?>
